package com.zhzy.api.fegin.service;

import com.zhzy.api.fegin.service.fallback.FMemberServiceHystric;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Created by fangzhipeng on 2017/4/6.
 * fallback = SchedualServiceHiHystric.class
 */
//fallback = FMemberServiceHystric.class 断路器（Hystrix）服务挂掉后，返回到错误的提示
@FeignClient(value = "member-service-feign",fallback = FMemberServiceHystric.class)
public interface FMemberService {
    @RequestMapping(value = "/findMember",method = RequestMethod.GET)
    String findMember(@RequestParam(value = "name") String name) ;
}
